package com.sservice.service.service.impl;

import com.sservice.model.dao.LadingBillLogMapper;
import com.sservice.model.entity.LadingBillLog;
import com.sservice.service.service.ILadingBillLogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by suweiming on 2017/12/20.
 */

@Service
public class ILadingBillLogServiceImpl implements ILadingBillLogService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private LadingBillLogMapper dataDao;


    @Override
    public int insertSelective(LadingBillLog record) {
        return dataDao.insertSelective(record);
    }

    @Override
    public int insertLog(String userId, String ladingBillId, String type) {
        LadingBillLog ladingBillLog = new LadingBillLog();
        ladingBillLog.setUserId(userId);
        ladingBillLog.setLadingBillId(ladingBillId);
        ladingBillLog.setType(type);
        return dataDao.insertSelective(ladingBillLog);
    }

    @Override
    public int insertLog(String userId, String ladingBillId, String type, String remark) {
        LadingBillLog ladingBillLog = new LadingBillLog();
        ladingBillLog.setUserId(userId);
        ladingBillLog.setLadingBillId(ladingBillId);
        ladingBillLog.setType(type);
        ladingBillLog.setRemark(remark);
        return dataDao.insertSelective(ladingBillLog);
    }
}
